Skip to content

v1.62.0.0 feat: add /grok skill for xAI second opinion from Claude Code#2241

Open
ljodea wants to merge 1 commit into
garrytan:mainfrom
ljodea:feat/grok-skill
Open

v1.62.0.0 feat: add /grok skill for xAI second opinion from Claude Code#2241
ljodea wants to merge 1 commit into
garrytan:mainfrom
ljodea:feat/grok-skill

Conversation

@ljodea

@ljodea ljodea commented Jul 11, 2026

Copy link
Copy Markdown

Summary

Adds /grok — the /codex twin for an independent second opinion from Grok Build CLI while working in Claude Code.

Three modes, same contract as /codex:

  • review — diff-scoped [P1]/[P2] findings + pass/fail gate
  • challenge — adversarial failure-mode review
  • consult — open Q&A with session resume (-r / -c)

Default model: grok-4.5 (overridable with -m). Always --permission-mode plan (read-only).

Why this PR (not #2016)

#2016 was the first cut. It drifted (VERSION behind main, merge conflicts, process gaps) and became hard to review. This re-lands the same product on current main as one clean commit:

  • Host exclusion fixed first-class: non-Claude hosts skip /grok like /codex
  • Correct VERSION claim (1.62.0.0; open title claims already use 1.61.0.0)
  • Tighter surface: skill + probe + tests + review-report row + docs inventory

Out of scope (intentionally):

Implementation

Piece Role
grok/SKILL.md.tmpl skill workflow
bin/gstack-grok-probe auth (~/.grok/auth.json, $XAI_API_KEY/$GROK_API_KEY), timeout, telemetry
test/grok-hardening.test.ts probe + invocation-contract invariants
scripts/resolvers/review.ts grok-review row in GSTACK REVIEW REPORT
hosts/* skipSkills: [..., 'grok'] on every non-Claude host

Usage (after merge + ./setup)

/grok review
/grok challenge security
/grok Is this migration ordering safe?

Requires grok on PATH and auth via grok login or $XAI_API_KEY.

Test plan

  • bun test test/grok-hardening.test.ts (11/11)
  • bun test test/host-config.test.ts test/skill-validation.test.ts test/gen-skill-docs.test.ts (green; /grok Claude-only assertions)
  • bun run gen:skill-docs --host all — no gstack-grok under external host output dirs
  • CI free suite on this PR

Supersedes #2016.

Symmetric counterpart to /codex: review (pass/fail on [P1]), adversarial
challenge, and consult with session resume. Runs read-only via
--permission-mode plan with bin/gstack-grok-probe for auth, timeout, and
telemetry. Default headless model: grok-4.5.

Also wires a grok-review row into GSTACK REVIEW REPORT, documents the skill
in AGENTS.md / docs/skills.md / README, and skips /grok on non-Claude hosts
(same convention as /codex). Unit tests cover the probe and host-exclusion.

VERSION 1.62.0.0 (avoids open title claim on 1.61.0.0). Supersedes garrytan#2016.
@trunk-io

trunk-io Bot commented Jul 11, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant